Skip to content

feat: implement channel adapter#19

Merged
Garfield550 merged 7 commits into
mainfrom
feat/implement-channel-adapter
May 23, 2026
Merged

feat: implement channel adapter#19
Garfield550 merged 7 commits into
mainfrom
feat/implement-channel-adapter

Conversation

@Garfield550

Copy link
Copy Markdown
Collaborator

Summary

  • Add the Eventa.Adapters channel transport package and ChannelPipe/ChannelEndpoint APIs.
  • Add erased envelope dispatch for transport-originated messages and deterministic transport-fatal invoke cleanup.
  • Document the channel adapter and add adapter integration tests.

Validation

  • dotnet build Eventa.slnx --configuration Release --no-restore
  • dotnet test --project tests/Eventa.Tests/Eventa.Tests.csproj --configuration Release --no-build
  • dotnet test --project tests/Eventa.Adapters.Tests/Eventa.Adapters.Tests.csproj --configuration Release --no-build

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new in-process channel transport adapter (Eventa.Adapters.Channels) and extends the core EventContext/listener infrastructure to support transport-originated envelope dispatch and deterministic “transport fatal” cleanup for pending invokes.

Changes:

  • Introduce Eventa.Adapters package with ChannelPipe/ChannelEndpoint and integration tests.
  • Add inbound dispatch (IEventInboundDispatcher.Receive) based on erased envelopes (IEventEnvelope) without re-entering the send path.
  • Add transport-fatal notification (IEventTransportFatalNotifier) and invoke-session faulting via a per-context registry.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/Eventa.Tests/xunit.runner.json Formatting normalization for xUnit runner config.
tests/Eventa.Tests/Support/InvokeSessionEngineTests.cs Adds tests for transport-fatal invoke faulting behavior.
tests/Eventa.Tests/EventContextTests.cs Adds coverage for inbound Receive dispatch and envelope type mismatch errors.
tests/Eventa.Adapters.Tests/xunit.runner.json Adds xUnit runner config for new adapters test project.
tests/Eventa.Adapters.Tests/packages.lock.json Adds lockfile for new adapters test project dependencies.
tests/Eventa.Adapters.Tests/Eventa.Adapters.Tests.csproj Introduces new adapters integration test project.
tests/Eventa.Adapters.Tests/Channels/ChannelPipeTests.cs End-to-end tests for emit/invoke forwarding and terminal closure semantics.
src/Eventa/Support/InvokeSessionEngine.cs Subscribes invoke sessions to transport-fatal notifications.
src/Eventa/Support/InvokeInternalConfig.cs Adds TransportFatalInvocationRegistry to track active invoke sessions.
src/Eventa/Support/EventListenerStore.cs Refactors listener storage to support erased-envelope snapshots for transport receives.
src/Eventa/Primitives/EventEnvelope.cs Makes EventEnvelope<T> implement IEventEnvelope for type erasure.
src/Eventa/EventContext.cs Implements inbound dispatch + transport-fatal notifier on the core context.
src/Eventa/Abstractions/IEventTransportFatalNotifier.cs New public abstraction for transport terminal failure notification.
src/Eventa/Abstractions/IEventInboundDispatcher.cs New public abstraction for dispatching transport-originated envelopes.
src/Eventa/Abstractions/IEventEnvelope.cs New public abstraction for erased envelopes.
src/Eventa.Adapters/Eventa.Adapters.csproj Adds new adapters library project.
src/Eventa.Adapters/Channels/ChannelPipe.cs Implements paired in-memory channel endpoints.
src/Eventa.Adapters/Channels/ChannelOptions.cs Defines ChannelPipeOptions / ChannelEndpointOptions.
src/Eventa.Adapters/Channels/ChannelMessages.cs Defines channel transport message + closure event payload/exception.
src/Eventa.Adapters/Channels/ChannelEndpoint.cs Implements endpoint lifecycle, inbound pump, and termination behavior.
src/Eventa.Adapters/Channels/ChannelAdapter.cs Adapter that mirrors OnSent to an outbound channel writer.
README.md Documents the channel adapter and adds example/commands updates.
Eventa.slnx Adds new adapters project + test project to the solution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Eventa.Adapters/Channels/ChannelEndpoint.cs Outdated
Comment thread src/Eventa.Adapters/Channels/ChannelMessages.cs Outdated
Comment thread src/Eventa.Adapters/Channels/ChannelAdapter.cs Outdated
Comment thread src/Eventa/EventContext.cs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.

Comment thread src/Eventa.Adapters/Channels/ChannelEndpoint.cs
Comment thread src/Eventa.Adapters/Channels/ChannelEndpoint.cs
Comment thread src/Eventa.Adapters/Channels/ChannelAdapter.cs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.

Comment thread src/Eventa.Adapters/Channels/ChannelEndpoint.cs
Comment thread src/Eventa/Abstractions/IEventaAdapter.cs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.

Comment thread src/Eventa.Adapters/Channels/ChannelEndpoint.cs Outdated
Comment thread src/Eventa.Adapters/Channels/ChannelEndpoint.cs
@Garfield550 Garfield550 marked this pull request as ready for review May 23, 2026 10:27
@Garfield550 Garfield550 merged commit 0093388 into main May 23, 2026
2 checks passed
@Garfield550 Garfield550 deleted the feat/implement-channel-adapter branch May 23, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants